﻿<!--{template header}-->

<!--{if $op == 'use'}-->

	<!--{if !$frombuy}-->
	<h1>使用道具</h1>
	<a class="float_del" title="关闭" href="javascript:hideMenu();">关闭</a>
	<!--{/if}-->
	<div class="toolly" id="__magicuse_form_$mid">
		<form method="post" id="magicuse_form_$mid" action="magic.php?mid=$mid&idtype=$idtype&id=$id">
			<div class="magic_img">
				<img src="image/magic/{$mid}.gif" alt="$magic[name]" />
			</div>
			<div class="magic_info">
				<h3>$magic[name]</h3>
				<p class="gray">$magic[description]</p>
				<p>拥有个数: $usermagic[count]</p>
				<p class="btn_line">
					<input type="hidden" name="formhash" value="<!--{eval echo formhash()}-->" />
					<input type="hidden" name="refer" value="$_SGLOBAL[refer]"/>
					<input type="hidden" name="usesubmit" value="1" />
					<input type="button" value="使用" class="submit" onclick="ajaxpost('magicuse_form_$mid')" />
				</p>
			</div>
		</form>
	</div>

<!--{elseif $op == 'show'}-->
	<div style="width:450px;">
		<!--{if $list}-->
		<p>
			用户拥有的道具
		</p>
		<ul>
			<!--{loop $list $value}-->
			<li style="float:left; padding:4px; width:80px; text-align:center;">
				<a href="cp.php?ac=magic&view=store&mid=$value[mid]" target="_blank">
					<img src="image/magic/{$value[mid]}.gif" alt="$_SGLOBAL[magic][$value[mid]]" />
				</a>
				<br />
				<a href="cp.php?ac=magic&view=store&mid=$value[mid]" target="_blank">$_SGLOBAL[magic][$value[mid]]</a>
			</li>
			<!--{/loop}-->
		</ul>
		<!--{else}-->
		<p>该用户还没有任何道具</p>
		<!--{/if}-->
	</div>
<!--{/if}-->

<!--{template footer}-->